<%@include file="import.jsp" %>
<html>
<head>
<%@include file="meta.jsp" %>
<%@include file="script.jsp" %>
<title>登录</title>
</head>
<body>
<script type="text/javascript">

function ss(){
alert("aaaaaaaa");
	$.ajax({
type:"POST",
url:"ValidateCode",
data:"",
dataType:"image",
cache: false,
async: false,
success: function(msg){
	     //alert( "str: " + msg);
    $("#validate_code").attr("src", msg);
	   }

		});
}

function _validateCode(ida){
	var timestamp = (new Date()).valueOf();
	
	var url = $("#"+ida).attr("src");
    url = url.substring(0,17);  
    if((url.indexOf("&")>=0)){  
        url = url + "&tamp=" + timestamp;  
    }else{  
        url = url + "?timestamp=" + timestamp;  
    }
    $("#"+ida).attr("src", url);
}

function fileTypeCheck(fileInputId){
	var fileName = $("#"+fileInputId).val();
	var fileType = fileName.substring(fileName.lastIndexOf('.')+1, fileName.length);
	alert(fileType);

	return true;
}

</script>

<form name="f_login" action="Login.jhtm" method="post">
<p>用户名：<input type="text" name="username"></p>
<p>验证码：<input type="text" name="validate_code_in"><a href="#" onclick="_validateCode('validate_code')"><img id="validate_code" alt="验证码" src="ValidateCode" ></a><span>${requestScopt.errorMsg}</span></p>
<input type="submit" value="登录">
</form>
<br/><br/>
<form name="f_file" action="fileupload/fileshowTest.jhtm" method="post" enctype="multipart/form-data" onsubmit="return fileTypeCheck('file')">
<input type="file" name="file" id="file"><br/>
<input type="file" name="file" id="file">
<input type="submit" value="上传">
</form>
<p>
文件列表：<br/>
<input type="button" value="跳转到文件列表" onclick="javascript:location='fileupload/fileList.jhtm'">
</p>

<p>
权限：<br/>
<input type="button" value="跳转到权限" onclick="javascript:location='permission/test.jsp'">
</p>

<p>
用户：user/user_list.jsp<br/>
<input type="button" value="跳转到用户" onclick="javascript:location='user/get'">
</p>
<p>
用户：user/usergroup_list.jsp<br/>
<input type="button" value="跳转到用户组" onclick="javascript:location='user/usergroup_list.jsp'">
</p>
</body>
</html>